package com.sunny.design.factory.simplefactory;

import com.sunny.design.factory.ICourse;
import com.sunny.design.factory.JavaCourse;
import com.sunny.design.factory.PythonCourse;

/**
 * @author Sunny
 * @date 2019/12/28 15:38
 */
public class SimpleFactoryTest {
    public static void main(String[] args) {
        ICourse java = CourseSimpleFactory.getCourse1("java");
        java.show();
        ICourse python = CourseSimpleFactory.getCourse1("python");
        python.show();

        java = CourseSimpleFactory.getCourse2(JavaCourse.class);
        java.show();
        python = CourseSimpleFactory.getCourse2(PythonCourse.class);
        python.show();
    }
}
